#include "arduPi.h"
#include "sim7x00.h"
#include "sim7000.h"
#include "ros/ros.h"
#include "kykt/gpsMsg.h"

sim7000 SIM7000X = sim7000();
kykt::gpsMsg msg;
int main(int argc, char **argv) {
	ros::init(argc, argv, "gps_node");
	ros::NodeHandle gps_node;
	ros::Publisher gps_pub = gps_node.advertise<kykt::gpsMsg>("gps", 1000);
	ros::Rate loop_rate(10);
	SIM7000X.Power_On();
	while (ros::ok())
	{
		SIM7000X.GPS_Positioning();
		msg.UTC_Time = SIM7000X._utc_time;
		msg.Latitude = SIM7000X._latitude;
		msg.Longitude = SIM7000X._longitude;
		gps_pub.publish(msg);
		ros::spinOnce();
		loop_rate.sleep();
	}
	return 0;
}
